package com.dingup.paike.enums;

/**
 * Created by wancheng on 2018/8/25.
 */
public enum PkLessonUserTypeEnum {

    MASTER("班主任"),
    TEACHER("老师"),
    STUDENT("学生"),
    OBSERVER("旁听");

    public static PkLessonUserTypeEnum getEnum(String type){
        PkLessonUserTypeEnum res = null;
        for (PkLessonUserTypeEnum e: PkLessonUserTypeEnum.values()) {
            if (e.name().equals(type)){
                res = e;
                break;
            }
        }
        return res;
    }

    private String name;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    PkLessonUserTypeEnum(String name) {
        this.name = name;
    }
}
